import request from '@/utils/request'

export const typesApi = () => {
    return request({
        url: '/type/list',
        method: 'get',
    })
}

export const typePages = query => {
    return request({
        url: '/type/page',
        method: 'get',
        params: query
    })
}

export const updateAndAddTypeApi = data => {
    return request({
        url: '/type/post',
        method: 'post',
        data: data
    })
}

export const deleteTypeApi = id => {
    return request({
        url: '/type/delete',
        method: 'delete',
        data: {id}
    })
}
